#pragma once
#include "LogRecorder.h"
#include <fstream>
#include <iostream>


class LOGRECORDER_API LogFileRocorder :public LogRecorder
{
public:

	LogFileRocorder(const std::string filename);

	/*
	*@brief      日志接口
	*@param[in]  level日志等级 log日志内容 file日治所在文件 line日志所在行数
	*/
	void doWrite(LogLevel level, const std::string& log, const std::string& file, int line) override;

private:
	/*
	*@brief      打开文件
	*/
	bool Open();

	std::ofstream mfs_;
	std::string mfilename{ "log.txt" };
};

